home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / cad / lasi512b.zip / CNVRTCIF.LHI < prev    next >
Text File  |  1996-04-04  |  22KB  |  490 lines

  1. ≡≡
  2.  
  3. Introduction
  4.  
  5.  Introduction
  6.  
  7.                  TLC2CIF and CIF2TLC Conversion Utilities
  8.                  ----------------------------------------
  9.  
  10.   Caltech Intermediate Form is a generalized way of transferring IC layout
  11.   information that was designed several years ago and has become a standard
  12.   used primarily by universities. It contains basic drawing items such as
  13.   boxes, polygons and cell (known as symbols). It is written in ASCII and
  14.   is therefore easy to read and is relatively forgiving in its file
  15.   structuring. CIF is particularly important because MOSIS cells are
  16.   distributed widely in the format. In fact, a small industry has grown up
  17.   around the format.
  18.  
  19.   LASI's TLC can be converted with minor changes to and from CIF using the
  20.   two conversion programs CIF2TLC.EXE and TLC2CIF.EXE. Since originally
  21.   written, and with experience, the two programs have become more and more
  22.   clever in understanding the data structures used in CIF, and have become
  23.   more aware of the idiosyncrasies that CIF often contains due to its open
  24.   and general nature.
  25.  
  26. Converting TLC to CIF (TLC2CIF)
  27.  
  28.  Conversion Files
  29.  
  30.   You need to set the following file parameters:
  31.  
  32.   ■ Main TLC File Name. This is the name and path of the TLC file that you
  33.     want to convert. The extension ".TLC" will be added it is not included.
  34.     If the cell contains other cells, their TLC files must also be present
  35.     in the same directory.
  36.  
  37.   ■ Layer File Name. This is the name and path of a file that equates layer
  38.     numbers to layer names. It must contain CIF comment lines as follows:
  39.  
  40.   <b0>(<b0>LAYER<b1>N<b1>[anychars<b1>]CIF="LNAME"[<b1>anychars]<b0>)<b0>;
  41.  
  42.     N is the integer number of the layer LNAME (uppercase, 4 char. max.)
  43.     and square brackets "[]" indicate the item is optional.
  44.  
  45.     If a CIF file contains layer comment lines, it can be used as the Layer
  46.     File. Include the extension in any Layer File Name.
  47.  
  48.   ■ CIF File Name. This is the name and path of the CIF file. The extension
  49.     ".CIF" will be added. If left blank, the CIF file will take the name of
  50.     the TLC file.
  51.  
  52.  Scale Conversion
  53.  
  54.   You can control the grid of the CIF file with the following item:
  55.  
  56.   ■ CIF Grid in um. If you want to change the grid of the CIF file you can
  57.     enter a new CIF grid. If this entry is left blank, grid parameters for
  58.     the CIF file are calculated from the LASI scale.
  59.  
  60.   A new CIF grid rescales the basic distance data and recalculates the
  61.   parameters of the CIF "DS" command. A CIF grid is always in microns.
  62.  
  63.   When TLC2CIF runs, it displays a Scale Bar at the bottom of the screen.
  64.   This indicates the CIF grid that is being used, the LASI units that are
  65.   being used and the the Rescale Ratio, which is the ratio of CIF units
  66.   (1/grid) to LASI units.
  67.  
  68.   To prevent roundoff errors, the Rescale Ratio should be an INTEGER.
  69.  
  70.   Since CIF grids are by definition restricted to multiples of 0.01um,
  71.   TLC2CIF will snap the new grid to the nearest 0.01um before it changes
  72.   data or parameters.
  73.  
  74.   If both the above requirements are not met, TLC2CIF will display a
  75.   warning, and will convert as accurately as it can.
  76.  
  77.   For example, if LASI was drawn to 20 units/um, you can make the CIF grid
  78.   0.05um or 0.01um, anything else will convert but will not be exact. If
  79.   you convert with, for instance, a 0.02um grid, errors up to 0.005um will
  80.   be made.
  81.  
  82.  Conversion Options
  83.  
  84.   Set the following conversion options:
  85.  
  86.   ■ Cellname User Extension Digit. You can add User Extension Commands
  87.     (UEC) to the CIF file. A UEC starts with a digit 0-9. Cellnames will be
  88.     added after a "DS" command by putting a number in the Cellname UEC
  89.     Digit. This is usually "9".
  90.  
  91.   ■ Make Only Proper Poly. This permits checking for polygons that may not
  92.     produce shapes with area that are normally used in an IC or PC board.
  93.     If this switch is set to "Y":
  94.  
  95.     ∙ Boxes with any opposite sides superimposed (crushed boxes) will be
  96.       removed.
  97.     ∙ Polygons with one vertex (single point) will be removed.
  98.     ∙ Polygons with only two vertices (line segments) will be removed.
  99.     ∙ Open polygons with more than two vertices will be closed.
  100.     ∙ Acute angles in paths or poly (before and after closure) will be
  101.       reported.
  102.  
  103.     Not Setting this will permit conversion of open line figures, such as
  104.     lines in a schematic. If set to "N":
  105.  
  106.     ∙ Crushed boxes will be reported but NOT removed.
  107.     ∙ Single points will be removed.
  108.     ∙ Line segments will be reported.
  109.     ∙ Open Polygons with more than two vertices will NOT be closed, but
  110.       will be reported.
  111.  
  112.   ■ Include LASI Text. This automatically adds a UEC to the CIF file in a
  113.     standard LASI format. This is explained under Text User Extensions.
  114.  
  115.   ■ Change Paths to Poly. You can avoid using CIF wires completely by
  116.     changing paths to polygons that trace the path periphery. Paths
  117.     replaced by polygons will convert just as you see them on the screen,
  118.     without any dependence on whether the original path was inline or
  119.     extended. If you want to change paths to polygons, set Change Paths to
  120.     Poly to "Y". Note that once changed to a polygon, a path cannot be
  121.     translated back again from a CIF file.
  122.  
  123.   ■ Report Destination. This allows you to print or save a conversion
  124.     report. The parameter must be one of the printers "LPT1","LPT2","LPT3"
  125.     or "PRN" (=LPT1), "FILE" for the file TLC2CIF.RPT or blank for no
  126.     report.
  127.  
  128.   If the Report Destination is blank, and a message occurs, the program
  129.   will pause and wait for a key to be pressed. Otherwise, there will be no
  130.   pause and the message will be written to the report.
  131.  
  132.  Path End Types
  133.  
  134.   LASI paths will normally be converted to CIF wires. Paths that convert to
  135.   wires must be the EXTENDED type with ends that extend half the width
  136.   beyond the vertex point. In the TLC file records these are marked with a
  137.   negative width. TLC2CIF will check path width sign, and if positive it
  138.   will change the path type. If for some reason you want to prevent this
  139.   conversion add "/NOFIX" to the command line when you run TLC2CIF.
  140.  
  141.   When a path type is changed, the end vertices are moved inward to the
  142.   nearest unit grid point that gives an end that extends GREATER THAN or
  143.   EQUAL TO the original distance. This insures that there will be a slight
  144.   overlap at the end of a path. However, it is recommended if you change
  145.   path types you should use CIF2TLC to reconstruct a layout to check
  146.   unusual or angled path ends.
  147.  
  148.   Note: The LASI 5.1 drawing program now contains features that let you
  149.     easily change path end types. If you find that you have used the wrong
  150.     path types you can go back to the drawing and correct them.
  151.  
  152.  Text User Extensions
  153.  
  154.   If the TLC files contain text, the text can be converted if the following
  155.   are set:
  156.  
  157.   ■ Text Template No. and the Text Templates. If the TLC file contains
  158.     text, the text can be converted to CIF User Extension Commands using a
  159.     Text Template. You have a choice of 4 templates (1-4). These are
  160.     outlines for how data is to be written in the text UEC. You can edit
  161.     each one by entering the Text Template No. and modifying the Text
  162.     Template. A template begins with 1 or 2 UEC digits (0-9) and is
  163.     followed by data words in angle brackets "<>" separated by one or more
  164.     spaces. The data words expect a corresponding type of data in the UEC.
  165.  
  166.   The data words are:
  167.  
  168.     <text>= text string
  169.     <layer>= numerical layer (LASI text only)
  170.     <lname>= CIF layer name
  171.     <size>= text size (LASI text only)
  172.     <orien>= orientation (LASI text only)
  173.     <x>= x position
  174.     <y>= y position
  175.  
  176.   The recommended templates for MOSIS and LASI text are:
  177.  
  178.   MOSIS= 94 <text> <x> <y> <lname>
  179.   LASI=  99 <layer> <size> <orien> <x> <y> <text>
  180.  
  181.   Notes:
  182.  
  183.   1. An undefined template word writes literally to the text UEC.
  184.   2. The spaces are necessary and correspond to the spaces in the UEC.
  185.   3. If the text contains any spaces, this may cause reading problems
  186.      later.
  187.   4. <text> in the last position of LASI text can contain spaces.
  188.   5. Since LASI text carries more information, you might always want to
  189.      include it in the CIF file. Set the Include LASI Text switch to "Y".
  190.  
  191.  Starting Conversion
  192.  
  193.   When you are happy with the setup, press ALT-G or click "Go" to start
  194.   conversion. The main processes will be indicated as the program runs. A
  195.   count of the CIF command items will be displayed and will be written to
  196.   the report. It is a good idea to make a report for future reference.
  197.  
  198.   If you have previously run TLC2CIF, there will be a setup file in the
  199.   drawing directory named TLC2CIF.SET. If this is found, the setup
  200.   parameters will be loaded when you first run TLC2CIF, and will be stored
  201.   again as you start the conversion. This saves a great deal of time when
  202.   running TLC2CIF since you only have to modify any parameters.
  203.  
  204.   Important: It is not guaranteed that future versions of TLC2CIF or
  205.     CIF2TLC will have the same SET file format. If you see obvious errors
  206.     in the setup values, just erase the old SET file, run the program again
  207.     and modify the default values.
  208.  
  209.  Errors and Warnings
  210.  
  211.   Most errors are self-explaining. The warnings that TLC2CIF lists as it
  212.   converts are as follows:
  213.  
  214.   "Resolution Lost ..." means that the CIF grid does not satisfy the
  215.   requirements for exact conversion from the LASI units that were used.
  216.   This is explained under Scale Conversion.
  217.  
  218.   "Path End Extended at ..." means that a path did not have ends that
  219.   extend half the width beyond the end vertices, that is, it was not marked
  220.   with a negative width. The end vertices if the path were moved to give
  221.   the correct end types.
  222.  
  223.   "Questionable Path End at ..." means that when changed to extended, two
  224.   vertices may be too close to make a correctly defined path. Note the
  225.   location and change it to an extended path on the layout.
  226.  
  227.   "Possible Coincidence at ..." means that when changed to extended, two
  228.   vertices will coincide and the end extension direction will be ambiguous.
  229.   Note the location and change it to an extended path on the layout.
  230.  
  231.   "Duplicate Vertex Removed at ..." means that two consecutive vertices in
  232.   a poly or path were found at the same location. One has been removed in
  233.   the final CIF file in the polygon or wire commands.
  234.  
  235.   "Crushed Box (Removed) at ..." means that a box with opposite sides
  236.   superimposed was found (and not converted).
  237.  
  238.   "Single Point Removed at ..." means that a poly or path with a single
  239.   vertex was found and not converted.
  240.  
  241.   "Acute Poly/Path Angle at ..." means that a polygon or path was found
  242.   with an acute angle in it. Generally, acute angles indicate shapes that
  243.   may be hard to reproduce, or polygons or paths that have been folded back
  244.   on themselves.
  245.  
  246.   "Poly Line Segment (Removed) at ..." means that a two vertex polygon was
  247.   found (and the line was not converted).
  248.  
  249.   "Open Poly (Closed) at ..." means that the first and last points of a
  250.   polygon were not the same (and a new point was added to close the poly).
  251.  
  252.   Note: The X=,Y= reported is always the first point of a poly or path or
  253.     the lower left corner of a box. L= is the layer
  254.  
  255. Converting CIF to TLC (CIF2TLC)
  256.  
  257.  Conversion Files
  258.  
  259.   You need to set the following file parameters:
  260.  
  261.   ■ CIF File Name. This is the name and path CIF file that you want to
  262.     convert. The extension ".CIF" will be added if it is omitted.
  263.  
  264.   ■ Cell File Name. This is the name and path of a file that relates CIF
  265.     symbol numbers to cellnames. Cell names can be related to CIF symbol
  266.     definitions numbers in two ways:
  267.  
  268.   1. The Cell File can be used. It must contain CIF comment lines as
  269.      follows:
  270.  
  271.      <b0>(<b0>#<b0>N<b1>CNAME<b0>)<b0>;    (<bn>= n or more CIF blanks)
  272.  
  273.      N is the symbol number of the cell CNAME in the CIF file. CNAME must
  274.      conform to DOS filename rules.
  275.  
  276.   2. If the Cell File Name is left blank, CIF2TLC will search the CIF file
  277.      for a User Extension Command (UEC) containing a cellname that follows
  278.      a "DS" (symbol definition start) command. The UEC with the cellname
  279.      usually begins with the single digit "9". If a cellname exceeds 8
  280.      characters, it will be truncated to conform to DOS filename rules.
  281.  
  282.   ■ Layer File Name. This is the name and path of a file that equates layer
  283.     numbers to layer names. It must contain CIF comment lines as follows:
  284.  
  285.   <b0>(<b0>LAYER<b1>N<b1>[anychars<b1>]CIF="LNAME"[<b1>anychars]<b0>)<b0>;
  286.  
  287.     N is the integer number of the layer LNAME (uppercase, 4 char. max.)
  288.     and square brackets "[]" indicate the item is optional.
  289.  
  290.     If the CIF file contains layer comment lines, it can be used as the
  291.     Layer File. Leave the Layer File Name blank to use the CIF file.
  292.     Include the extension in any Layer File Name.
  293.  
  294.   ■ Path of TLC Files. This is the path of the directory where you want the
  295.     TLC files to be placed. Leave this blank for the current directory.
  296.  
  297.  Scale Conversion
  298.  
  299.   You can control the scale of the TLC files with the following item:
  300.  
  301.   ■ LASI Scale Units/um. This is the number of LASI scale units that you
  302.     are using or want to use in your LASI drawing.
  303.  
  304.   If the LASI Scale Units/um is left blank, the scale parameters for the
  305.   TLC files are calculated from the CIF grid. If you want to change the
  306.   scale of the TLC files you can set the LASI units.
  307.  
  308.   As CIF2TLC converts each individual cell, it checks each dimension (CIF
  309.   "sinteger" data) for the least resolution (or coarsest grid) that will
  310.   fit that particular cell.
  311.  
  312.   As it converts all cells, it determines the least resolution that will
  313.   convert ALL cells correctly, and displays it as the Minimum Feature size
  314.   along with the CIF grid and the LASI units in the Scaling Bar, at the
  315.   bottom or the display.
  316.  
  317.   The minimum number of LASI units needed to convert ALL cells is the
  318.   reciprocal of the Minimum Feature.
  319.  
  320.   For example, if the CIF file grid reads as .05 um/unit, but the Minimum
  321.   Feature size is read as 0.25um, you might want to downsize the basic data
  322.   so that each LASI unit will be 0.25um. You would set the LASI scale to 4
  323.   units in that case.
  324.  
  325.   Any INTEGRAL multiple of the minimum LASI units will also be correct. In
  326.   the above example, you might want to set the LASI units to 20 (= 4x5).
  327.   This would allow for better drawing resolution in the future.
  328.  
  329.   Note: Path widths (wires) in a CIF file should be drawn to HALF the
  330.     resolution to which position coordinates are drawn. If they are not,
  331.     you can have the situation where the path sides will be on half LASI
  332.     basic unit positions. LASI will tolerate this, but the sides will be
  333.     drawn on either higher or lower basic unit positions, or a path side
  334.     will be tilted between different basic units at either end. If this
  335.     happens you should DOUBLE your LASI Units.
  336.  
  337.  Conversion Options
  338.  
  339.   Set the following conversion options:
  340.  
  341.   ■ Cellname UEC Digit. The CIF file will usually contain a User Extension
  342.     Command (UEC) that gives symbol (or cell) names. The UEC starts with a
  343.     digit 0-9. This is usually "9" for cellnames, but can be changed in
  344.     rare cases.
  345.  
  346.   ■ Close Open Poly. Some CIF files may contain polygons that are implied
  347.     closed, that is, the first and last data points that do not coincide,
  348.     but it is expected that any software will fill in the last point to
  349.     close the polygon. LASI can have open or closed polygons because the
  350.     last point is always included. If you want CIF2TLC to close all
  351.     polygons, set this to "Y".
  352.  
  353.   ■ Make Inline Paths. CIF wires will normally be converted to EXTENDED
  354.     path types with ends that extend half the width beyond the vertex
  355.     point. These are marked with negative TLC path widths. If INLINE paths
  356.     that have ends inline with the end vertices and have positive widths
  357.     are wanted, set this to "Y".
  358.  
  359.     When a path type is changed to inline, the end vertices are moved
  360.     outward to the nearest unit grid point that gives an end that extends
  361.     GREATER THAN or EQUAL TO the original distance. This insures that there
  362.     will be a slight overlap at the end of a path. However, it is
  363.     recommended that if you change path types you should inspect unusual or
  364.     angled path ends on the layout.
  365.  
  366.   ■ Make REF File. CIF2TLC lets you write a CELLS.REF file that contains a
  367.     list of all the cells created. This is the same as TLCOUT makes and is
  368.     very handy if you have a large number of cells and no main cell. The
  369.     file will be made in the directory where the TLC files are made. If you
  370.     want a CELLS.REF file set this to "Y".
  371.  
  372.   ■ Report Destination. This allows you to print or save a conversion
  373.     report. The parameter must be one of the printers "LPT1","LPT2","LPT3"
  374.     or "PRN" (=LPT1), "FILE" for the file CIF2TLC.RPT or blank for no
  375.     report.
  376.  
  377.   If the Report Destination is blank, and a message occurs, the program
  378.   will pause and wait for a key to be pressed. Otherwise, there will be no
  379.   pause and the message will be written to the report.
  380.  
  381.  Text User Extensions
  382.  
  383.   If the CIF file contains User Extension Commands for text, the text can
  384.   be converted if the following is set:
  385.  
  386.   ■ Default Text Size in um. If the CIF file contains text UEC, there may
  387.     be no text size attribute. This is the default size to use.
  388.  
  389.   ■ Text Template No. and the Text Templates. You have a choice of 4
  390.     templates (1-4). These are outlines for how data is arranged in the
  391.     text UEC. You can edit each one by entering the Text Template No. and
  392.     modifying the Text Template. The template begins with 1 or 2 UEC digits
  393.     (0-9) and is followed by data words in angle brackets "<>" separated by
  394.     one or more spaces. The data words expect a corresponding type of data
  395.     in the UEC command.
  396.  
  397.   The data words are:
  398.  
  399.     <text>= text string
  400.     <layer>= numerical layer (LASI text only)
  401.     <lname>= CIF layer name
  402.     <size>= text size (LASI text only)
  403.     <orien>= orientation (LASI text only)
  404.     <x>= x position
  405.     <y>= y position
  406.  
  407.   The recommended templates for MOSIS and LASI text are:
  408.  
  409.     MOSIS= 94 <text> <x> <y> <lname>
  410.     LASI=  99 <layer> <size> <orien> <x> <y> <text>
  411.  
  412.   Text Notes:
  413.  
  414.   1. An undefined word or an empty bracket causes data to be skipped.
  415.   2. The spaces are necessary and correspond to the spaces in the UEC.
  416.   3. If <text> is placed last in the UEC it will be read to a ";" and can
  417.   contain spaces.
  418.  
  419.  Starting Conversion
  420.  
  421.   When you are happy with the setup, press ALT-G or click "Go" to start
  422.   conversion. The main processes will be indicated as the program runs. A
  423.   count of the TLC objects will be displayed and will be written to the
  424.   report. It is a good idea to make a report for future reference.
  425.  
  426.   Note: The counts show the actual number of TLC object records. The
  427.     (Vertex) count shows how many vertices will be needed when the TLC
  428.     objects are changed to internal LASI object records.
  429.  
  430.   If you have previously run CIF2TLC, there will be a setup file in the
  431.   drawing directory named CIF2TLC.SET. If this is found, the setup
  432.   parameters will be loaded when you first run CIF2TLC, and will be stored
  433.   again as you start the conversion. This saves a great deal of time when
  434.   running CIF2TLC since you only have to modify any parameters.
  435.  
  436.  Errors and Warnings
  437.  
  438.   "Resolution Lost ..." means that the number of LASI Units per Phys Unit
  439.   was incorrect for the CIF grid. The number of LASI units may have been
  440.   too small, or the LASI grid may have been the wrong size to fit the CIF
  441.   grid exactly. The number given is the minimum number of LASI basic units
  442.   that are needed. This is explained under Scale Conversion.
  443.  
  444.   "CIF File is Missing" indicates the CIF file is not in the path\directory
  445.   you have listed.
  446.  
  447.   "Cell Info is Incorrect or Missing" indicates that the Cell information
  448.   could not be found in a separate file, or if you left the Cell File Name
  449.   blank the CIF file did not contain the correct User Extension Commands.
  450.  
  451.   "Layer File is Missing or Incorrect" indicates that the file containing
  452.   layer names could not be located, or had incorrect format, and no layer
  453.   names were determined.
  454.  
  455.   "CIF File has Too Many End Commands ..." indicates that more than one "E"
  456.   was found in the CIF file. This is considered illegal.
  457.  
  458.   "Vertex Coincidence at ..." indicates that more than one vertex was found
  459.   on a path end and conversion to an inline path would be ambiguous. The
  460.   path was converted to inline but one or more ends may be short by half
  461.   the path width. Note the location and fix it on the converted layout.
  462.  
  463. Parameter Line Editor
  464.  
  465.  Parameter Line Editor
  466.  
  467.   Both programs now use a simple line editor that resembles the editor used
  468.   with Windows. The editor operates as follows:
  469.  
  470.   ■ To move from parameter to parameter, press the UP/DOWN ARROW keys,
  471.     (SHIFT)TAB, or click the mouse on a parameter.
  472.  
  473.   ■ Press PGUP/PGDN to move to the first or last parameter.
  474.  
  475.   ■ Press LEFT/RIGHT ARROW to move the text cursor left or right.
  476.  
  477.   ■ Press HOME/END to move the cursor to the beginning or end of a line.
  478.  
  479.   ■ Press BACKSPACE to erase a character to the left of the cursor.
  480.  
  481.   ■ Press DELETE to erase the character to the right of the cursor.
  482.  
  483.   ■ Press CTRL-BACKSPACE to completely erase a text line.
  484.  
  485.   ■ When you first select a parameter, typing any printable character other
  486.     than SPACE or LEFT/RIGHT ARROW will replace the whole text line.
  487.  
  488.   ■ If you make a mistake press ESC to restore the original text.
  489.  
  490.